package com.emapp.lccode.bean

import android.annotation.SuppressLint
import android.os.Parcelable
import com.mylhyl.circledialog.callback.CircleItemLabel
import kotlinx.android.parcel.Parcelize
import kotlinx.parcelize.IgnoredOnParcel

@SuppressLint("ParcelCreator")
@Parcelize
data class ProblemTypeKt(
    var id: String,
    var title: String,
    var pid: String,
    var sort: String,
    var remark: String,
    var create_time: String,
    var type: String,
    var update_time: String,
    var status: String
) : Parcelable, CircleItemLabel {
    var isCheck = false
    var open = false
    var name = ""
    var level = ""
    var child: ArrayList<ProblemTypeKt> = arrayListOf()

    @IgnoredOnParcel
    var problemType2: ArrayList<ProblemTypeKt> = arrayListOf()
        get() {
            if (field == null) {
                field = arrayListOf()
            }
            return field
        }

    override fun getItemLabel(): String {
        if (title.isNullOrBlank())
            return name
        return title
    }
}
